]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
meson: Add some compiler arguments to debug builds
authorRobert Mader <robert.mader@posteo.de>
Sun, 17 Mar 2019 13:38:39 +0000 (14:38 +0100)
committerRobert Mader <r.mader@liqd.net>
Wed, 29 May 2019 15:14:56 +0000 (17:14 +0200)
To get better debug information.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/464

meson.build

index efe45734ec328f797535a384823edc16fbd3ccfc..6e821b8a941f9790a3f9560580990bac3050e738 100644 (file)
@@ -209,6 +209,15 @@ supported_warnings = cc.get_supported_arguments(all_warnings)
 
 add_project_arguments(supported_warnings, language: 'c')
 
+if get_option('debug')
+  debug_c_args = [
+    '-DG_ENABLE_DEBUG',
+    '-fno-omit-frame-pointer'
+  ]
+  supported_debug_c_args = cc.get_supported_arguments(debug_c_args)
+  add_project_arguments(supported_debug_c_args, language: 'c')
+endif
+
 config_h = configure_file(
   input: 'config.h.meson',
   output: 'config.h',